cmake_minimum_required(VERSION 3.15)
project(try-cmake C)

add_subdirectory(mymod1)

include(FetchContent)
FetchContent_Declare(mymod2
    GIT_REPOSITORY https://gitee.com/liigo/mymod2.git
    GIT_TAG master
)
FetchContent_MakeAvailable(mymod2)

add_executable(myexe)
target_sources(myexe PRIVATE main.c)
target_compile_features(myexe PRIVATE c_std_11)
target_link_libraries(myexe PRIVATE mymod1 mymod2)
